<h1><?=$this->translate->_('user_header')?></h1>

<?=$this->paginationControl($this->results, 'Sliding', 'pagination_control.phtml', array('route' => 'default'))?>

<?if($this->count > 0):?>
	<?$i=0;?>
	<table summary="user" class="table_users">
	<tr>
		<th><?=$this->translate->_('user_username')?></th>
		<th><?=$this->translate->_('user_forename')?></th>
		<th><?=$this->translate->_('user_lastname')?></th>
		<th><?=$this->translate->_('user_posts')?></th>
		<th><?=$this->translate->_('user_create_date')?></th>
		<th><?=$this->translate->_('user_rank')?></th>
		<th><?=$this->translate->_('user_next_rank')?></th>
	</tr>
	<?foreach($this->results AS $result):?>
	<?$i++;?>
	<? $points = $this->getActivityPoints($result['uid']); ?>
	<tr>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><a href="<?=$this->url(array('controller' => 'profile', 'action' => 'index', 'uid' => $result['uid']),'profile', true)?>"><?=$this->escape($result['username'])?></a></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><?=$this->escape($result['forename'])?></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><?=$this->escape($result['lastname'])?></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><?=$this->escape($result['count_posts'])?></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><?=$this->datetime($result['create_date'])?></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><?=$points['title']?></td>
		<td class="<?=$i%2 == 0 ? 'cell1' : 'cell2';?>"><div class="percent"><span style="width:<?=$points['percent']?>px;">&nbsp;</span></div></td>
	</tr>
	<?endforeach;?>
	</table>
	<br />
	<?=$this->paginationControl($this->results, 'Sliding', 'pagination_control.phtml', array('route' => 'default'))?>
<?else:?>
	<p class="notice_bad"><?=$this->translate->_('user_error')?></p>
<?endif;?>